//
//  SecondCollectionViewCell.m
//  YouMin_iOS
//
//  Created by lanou3g on 15/12/9.
//  Copyright © 2015年 wey. All rights reserved.
//

#import "SecondCollectionViewCell.h"
#import "EntityModel.h"
@interface SecondCollectionViewCell ()
///  iconView
@property (weak, nonatomic) IBOutlet UIImageView *iconView;
///  标题
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
///  nickName
@property (weak, nonatomic) IBOutlet UILabel *nickNameLabel;
///  nickIcon
@property (weak, nonatomic) IBOutlet UIImageView *nickIcon;


@end

@implementation SecondCollectionViewCell

- (void)setModel:(EntityModel *)model {

    self.titleLabel.font = [UIFont systemFontOfSize:12 weight:20];
    self.titleLabel.preferredMaxLayoutWidth = [UIScreen mainScreen].bounds.size.width/2 - 10;
    self.nickNameLabel.font = [UIFont systemFontOfSize:10 weight:20];
    _model = model;
    self.nickNameLabel.text = model.nickName;
    self.nickIcon.layer.cornerRadius = self.nickIcon.frame.size.width/2;
    self.nickIcon.layer.masksToBounds = YES;
    [self.nickIcon sd_setImageWithURL:[NSURL URLWithString:model.nickImgUrl] placeholderImage:[UIImage imageNamed:placeHolder]];
    self.iconView.layer.cornerRadius = 10.0;
    self.iconView.layer.masksToBounds = YES;
    [self.iconView sd_setImageWithURL:[NSURL URLWithString:model.index_cover] placeholderImage:[UIImage imageNamed:placeHolder]];
    self.titleLabel.text = model.index_title;
}

@end
